package cn.lyjuan.dwz_manage.core.java.mapper;


import cn.lyjuan.dwz_manage.core.base.mapper.IActionGroupMapper;
import cn.lyjuan.dwz_manage.core.base.pojo.ActionGroupPojo;
import cn.lyjuan.dwz_manage.core.java.dto.GroupActionBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by ly on 2014/11/21.
 */
public interface IMgActionGroupMapper extends IActionGroupMapper
{
    /**
     * 超级管理员可见所有权限
     *
     * @return
     */
    List<GroupActionBean> selectAllActions(@Param("onlyNav")boolean onlyNav);

    /**
     * 查询用户的权限
     *
     * @param manageid
     * @return
     */
    List<GroupActionBean> selectActionsForManage(@Param("manageid") int manageid, @Param("onlyNav")boolean onlyNav);

    /**
     * 搜索组信息
     * @param param
     * @param start
     * @param len
     * @return
     */
    List<ActionGroupPojo> selectGroups(@Param("param") Map<String, String> param, @Param("start") int start, @Param("len") int len);

    /**
     * 搜索组信息数量
     * @param param
     * @return
     */
    int selectGroupCount(@Param("param") Map<String, String> param);

    /**
     * 锁定组信息
     * @param id
     * @return
     */
    int lockGroupById(@Param("id") int id);
}